<html>
<head><meta charset="utf-8"><title>How to set breakpoints inside llvm? · t-compiler/wg-llvm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/index.html">t-compiler/wg-llvm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/How.20to.20set.20breakpoints.20inside.20llvm.3F.html">How to set breakpoints inside llvm?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="226453136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/How%20to%20set%20breakpoints%20inside%20llvm%3F/near/226453136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> moxian <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/How.20to.20set.20breakpoints.20inside.20llvm.3F.html#226453136">(Feb 15 2021 at 22:52)</a>:</h4>
<p>Hello, I was directed here from <a href="https://rustc-dev-guide.rust-lang.org/backend/debugging.html">https://rustc-dev-guide.rust-lang.org/backend/debugging.html</a>, but this also feels like a very beginner question. Hope this is appropriate.</p>
<p>I'm trying to debug <a href="https://github.com/rust-lang/rust/issues/81051#issuecomment-779374088">https://github.com/rust-lang/rust/issues/81051#issuecomment-779374088</a> (cc <span class="user-mention" data-user-id="138448">@cuviper</span> ), and am having troubles stepping through llvm source. More specifically, I seem to be unable to set breakpoints inside llvm.<br>
I'm using <code>lldb</code>. All of the <code>b setDeleteDisposition</code>, <code>b TempFile::keep</code>, <code>b Path.cpp:1198</code> result in the same <code>WARNING:  Unable to resolve breakpoint to any actual locations.</code>, and <code>rustc</code> running happily till the end, not triggering a breakpoint.<br>
This happens with both distributed nightlies, and with self-built <code>rustc</code> (I have <code>profile = "codegen"</code> in config.toml, but no further changes).<br>
I would guess the debug info is simply stripped when building LLVM. Is there a way to change that?</p>



<a name="226453218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/How%20to%20set%20breakpoints%20inside%20llvm%3F/near/226453218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/How.20to.20set.20breakpoints.20inside.20llvm.3F.html#226453218">(Feb 15 2021 at 22:54)</a>:</h4>
<p>in your rust <code>config.toml</code>, try setting <code>[llvm] release-debuginfo = true</code></p>



<a name="226453246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187780-t-compiler/wg-llvm/topic/How%20to%20set%20breakpoints%20inside%20llvm%3F/near/226453246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> moxian <a href="https://rust-lang.github.io/zulip_archive/stream/187780-t-compiler/wg-llvm/topic/How.20to.20set.20breakpoints.20inside.20llvm.3F.html#226453246">(Feb 15 2021 at 22:55)</a>:</h4>
<p>Thanks, will do, and see how it goes.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>